package com.hai.server.impl;

import javax.ws.rs.BeanParam;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;

import com.hai.pojo.User;
import com.hai.server.LoginServerInf;
import com.hai.service.LoginServiceInf;

public class LoginServerImp implements LoginServerInf{

	@Autowired
	private LoginServiceInf loginService;
	
	@Override
	@Path("login")
	@GET
	@Consumes(MediaType.TEXT_HTML_VALUE)
	@Produces(MediaType.APPLICATION_JSON_UTF8_VALUE)
	public String login(@BeanParam User user) {
		System.out.println("调用了ws的rest服务");
		return loginService.login(user);
	}

}
